var moveZeroes = function(nums) {
    let n  = nums.length,
        r=0
    for(let i=0;i<n;i++){
        if(nums[i]==0) continue
        nums[r++]=nums[i]
    }
    for(;r<n;r++){
        nums[r]=0
    }
    //console.log(nums);
};

moveZeroes([1,0,2,0,0,3,0])
